<!DOCTYPE html>
<html >
	<head>
		<meta charset="utf-8" />
		<script type="text/javascript" src="../js/angular.js" ></script>
		<title></title>
		<link rel="stylesheet" href="../css/font-awesome/css/font-awesome.css">
	</head>

	<body ng-app="app" >
		<div ng-controller="ctrl1" >
			{{data.name}}
			<input type="text" ng-model="data.name" >
			<div ng-controller="ctrl2" >
				{{data.name}}
				<input type="text" ng-model="data.name" >
			</div>
			<div ng-controller="ctrl3" >
				{{data.name}}
			</div>
		</div>
		<script>
			var app=angular.module("app",[]);
			app.controller("ctrl1",["$scope",function ($scope) {
				$scope.data={name:"张三"};
            }]);
            app.controller("ctrl2",["$scope",function ($scope) {

            }]);
            app.controller("ctrl3",["$scope",function ($scope) {

            }]);
		</script>
	</body>
</html>
